import 'package:flutter/material.dart';

class MyApp7 extends StatelessWidget {
  const MyApp7({super.key});

  @override
  Widget build(BuildContext context) {
    // const int age = 18;

    return Scaffold(
        // 1. 导航条
        appBar: AppBar(
          title: const Text('无状态组件'),
          backgroundColor: Colors.pink,
        ),
        // 2. 主体内容
        body: Center(
          child: Container(
            width: 300,
            height: 400,
            padding: const EdgeInsets.only(left: 0),
            color: Colors.cyan,
            // 2.1 加载网络图片
            // child: Image.network('https://yanxuan-item.nosdn.127.net/e529b6ab111ade9da9314867f98d360f.png', fit: BoxFit.contain)
            // 2.2 加载本地图片
            child: Image.asset('open_eyes.png'),
          ),
        )
      );
  }
}
